Vue.component("zh-tabbar", {
    template: `<div class="weui-tabbar" style="position: fixed;bottom: 0">
                        <a @click="tab(0)" href="javascript:;" class="weui-tabbar__item">
                            <div class="weui-tabbar__icon">
                                <img :src="isTab==0?'./images/tab2.png':'./images/tab.png'" alt="">
                            </div>
                            <p class="weui-tabbar__label" :style="{color:isTab==0?'#218ff9':''}">首页</p>
                        </a>
                        <a @click="tab(1)" href="javascript:;" class="weui-tabbar__item" >
                            <div class="weui-tabbar__icon">
                                <img :src="isTab==1?'./images/tab3.png':'./images/tab4.png'" alt="">
                            </div>
                            <p class="weui-tabbar__label" :style="{color:isTab==1?'#218ff9':''}">生活圈</p>
                        </a>
                        <a @click="tab(2)" href="javascript:;" class="weui-tabbar__item" >
                            <div class="weui-tabbar__icon">
                                <img :src="isTab==2?'./images/tab5.png':'./images/tab6.png'" alt="">
                            </div>
                            <p class="weui-tabbar__label" :style="{color:isTab==2?'#218ff9':''}">订单</p>
                        </a>
                        <a @click="tab(3)" href="javascript:;" class="weui-tabbar__item" >
                            <div class="weui-tabbar__icon">
                                <img :src="isTab==3?'./images/tab7.png':'./images/tab8.png'" alt="">
                            </div>
                            <p class="weui-tabbar__label" :style="{color:isTab==3?'#218ff9':''}">入驻</p>
                        </a>
                        <a @click="tab(4)" href="javascript:;" class="weui-tabbar__item" >
                            <div class="weui-tabbar__icon">
                                <img :src="isTab==4?'./images/tab9.png':'./images/tab10.png'" alt="">
                            </div>
                            <p class="weui-tabbar__label" :style="{color:isTab==4?'#218ff9':''}">我的</p>
                        </a>
                    </div>`,
    props: {
        'isTab': {
            type: String
        }
    },
    methods: {
        tab: function (data) {
            switch (data) {
                case 0:
                    window.location.href = 'home.html'
                    break;
                case 1:
                    window.location.href = 'lifeCircle.html'
                    break;
                case 2:
                    window.location.href = 'coupon.html'
                    break;
                case 3:
                    window.location.href = 'admission.html'
                    break;
                case 4:
                    window.location.href = 'my.html'
                    break;
            }
        }
    }
})